<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>jQtext</title>
	<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function () {
			$("#btn1").click(function () {
				alert("Text:"+$("#test").text());

			});

			$("#btn2").click(function () {
				alert("Html:"+$("#test").html());
			});
		})
	</script>
</head>
<body>
<p id="test">这是段落中的<b>粗体</b>文本.</p>
<button id="btn1">显示文本</button>
<button id="btn2">显示</button>

</body>
</html>